#ifndef CONTEXTVIEWERWIDGET_H
#define CONTEXTVIEWERWIDGET_H

#include <QObject>
#include <QGraphicsWidget>
#include <QPainter>
#include <QBrush>
#include <QColor>

class ContextViewerWidget : public QGraphicsWidget
{
    Q_OBJECT
public:
    explicit ContextViewerWidget(QGraphicsItem *parent = 0);
    explicit ContextViewerWidget(int total, int start, int end, QGraphicsItem *parent = 0);

    void setGeometry(const QRectF &geom);
    void setGeometry( qreal x, qreal y, qreal w, qreal h );
    QRectF boundingRect() const;
    QPainterPath shape() const;

    //PAINT FUNCTIONS
    //void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
    //           QWidget *widget);

signals:
    
public slots:

private:
    int total;
    int start;
    int end;

    QGraphicsRectItem* bigRect;
    QGraphicsRectItem* littleRect;

    void init(int total, int start, int end);
    void resizeRects();
    
};

#endif // CONTEXTVIEWERWIDGET_H
